import App from './App'
import {
	createSSRApp
} from 'vue';
import store from './store';
import {
	uiwu,
	// ws
} from './config/config';
// import { socket } from './config/socket';
// import {
// 	socket
// } from './config/ws';
// // socket.init('120.76.43.65',2348)
// socket.init(ws);


// 外网面板地址: http://8.138.87.107:18456/14c1ef83
//  内网面板地址: http://172.29.236.202:18456/14c1ef83
//  username: fas6pyae
//  password: cdf2c12c


import messages from './locale/index'
import {
	createI18n
} from 'vue-i18n'

let i18nConfig = {
	locale: uni.getLocale(),
	messages
}

const i18n = createI18n(i18nConfig)

export function createApp() {
	const app = createSSRApp(App)
	app.use(i18n)
	app.provide('uiwu', uiwu)
	app.provide('store', store);
	// app.provide('socket', socket);
	app.config.globalProperties.uiwu = uiwu
	return {
		app
	}
}